CREATE TABLE Instances (Instances_Id COUNTER, ClassName TEXT, State SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Instances_Id) )
CREATE TABLE Etat (Etat_Id LONG, State_ SHORT, concours TEXT, Atudiant TEXT, rang SHORT, RelationState_ SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Etat_Id) )
CREATE TABLE Adresse (Adresse_Id LONG, State_ SHORT, voie TEXT, num_ro TEXT, code_postal TEXT, commune TEXT, pays TEXT, RelationState_ SHORT, RelationState_1 SHORT, RelationState_2 SHORT, RelationState_3 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Adresse_Id) )
CREATE TABLE Concours (Concours_Id LONG, State_ SHORT, ann_e TEXT, limite_candidature_Voie_A DATE, limite_candidature_Voie_B DATE, date__crit DATE, date_jury_d_admissibilit_ DATE, date_publication_d_admissibilit_ DATE, date_jury_d_admission DATE, date_publication_d_admission DATE, coefficient_dossier_voie_B SHORT, coefficient_oral SHORT, frais_de_dossier__nbr__coles_ TEXT, RelationState_ SHORT, RelationState_1 SHORT, RelationState_2 SHORT, RelationState_3 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Concours_Id) )
CREATE TABLE Envoi_dossier (Envoi_dossier_Id LONG, State_ SHORT, date_1 DATE, Adresse_Id LONG CONSTRAINT REnvoi_dossier_Adresse_Id REFERENCES Adresse (Adresse_Id), RelationState_Adresse_Id SHORT, Concours_Id LONG CONSTRAINT REnvoi_dossier_Concours_Id REFERENCES Concours (Concours_Id), RelationState_Concours_Id SHORT, RelationState_ SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Envoi_dossier_Id) )
CREATE TABLE Dossier (Dossier_Id LONG, State_ SHORT, num_ro SHORT, voie TEXT, RelationState_ SHORT, Envoi_dossier_Id LONG CONSTRAINT RDossier_Envoi_dossier_Id REFERENCES Envoi_dossier (Envoi_dossier_Id), RelationState_Envoi_dossier_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Dossier_Id) )
CREATE TABLE Etudiant (Etudiant_Id LONG, State_ SHORT, statut TEXT, RelationState_ SHORT, RelationState_dernier_dipl_me SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Etudiant_Id) )
CREATE TABLE Candidature (Candidature_Id LONG, State_ SHORT, num_ro_Anonymat SHORT, pr_f_rence TEXT, date_r_ception DATE, langue TEXT, RelationState_ SHORT, RelationState_1 SHORT, Dossier_Id LONG CONSTRAINT RCandidature_Dossier_Id REFERENCES Dossier (Dossier_Id), RelationState_Dossier_Id SHORT, Concours_Id LONG CONSTRAINT RCandidature_Concours_Id REFERENCES Concours (Concours_Id), RelationState_Concours_Id SHORT, Etudiant_Id LONG CONSTRAINT RCandidature_Etudiant_Id REFERENCES Etudiant (Etudiant_Id), RelationState_Etudiant_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Candidature_Id) )
CREATE TABLE Candidature_Voie_B (Candidature_Voie_B_Id LONG, State_ SHORT, note_Dossier SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Candidature_Voie_B_Id) )
CREATE TABLE Dipl_me (Dipl_me_Id LONG, State_ SHORT, type TEXT, d_tails_dipl_me TEXT, Atat TEXT, ville_d_obtention TEXT, nom_d_partment TEXT, num_ro_d_partement TEXT, Etudiant_Id LONG CONSTRAINT RDipl_me_Etudiant_Id REFERENCES Etudiant (Etudiant_Id), RelationState_Etudiant_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Dipl_me_Id) )
CREATE TABLE Candidature_2_me_ann_e (Candidature_2_me_ann_e_Id LONG, State_ SHORT, note_Dossier SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Candidature_2_me_ann_e_Id) )
CREATE TABLE Ecole (Ecole_Id LONG, State_ SHORT, nom TEXT, RelationState_ SHORT, Adresse_Id LONG CONSTRAINT REcole_Adresse_Id REFERENCES Adresse (Adresse_Id), RelationState_Adresse_Id SHORT, RelationState_1 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Ecole_Id) )
CREATE TABLE Salle (Salle_Id LONG, State_ SHORT, id TEXT, RelationState_ SHORT, RelationState_1 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Salle_Id) )
CREATE TABLE Jury_Oral (Jury_Oral_Id LONG, State_ SHORT, date_1 DATE, p_riode TEXT, RelationState_ SHORT, RelationState_1 SHORT, Salle_Id LONG CONSTRAINT RJury_Oral_Salle_Id REFERENCES Salle (Salle_Id), RelationState_Salle_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Jury_Oral_Id) )
CREATE TABLE Particularit_s_d__cole (Particularit_s_d__cole_Id LONG, State_ SHORT, limite_inscription DATE, nombre_de_places_Voie_A SHORT, nombre_de_places_Voie_B SHORT, d_but_oraux DATE, fin_oraux DATE, nbr_places_2__me_ann_e SHORT, Concours_Id LONG CONSTRAINT RParticularit_s_d__cole_Concours_Id REFERENCES Concours (Concours_Id), RelationState_Concours_Id SHORT, Ecole_Id LONG CONSTRAINT RParticularit_s_d__cole_Ecole_Id REFERENCES Ecole (Ecole_Id), RelationState_Ecole_Id SHORT, CONSTRAINT MConcours_IdEcole_Id UNIQUE (Concours_Id, Ecole_Id), CONSTRAINT PrimaryKeys PRIMARY KEY (Particularit_s_d__cole_Id) )
CREATE TABLE Entretien (Entretien_Id LONG, State_ SHORT, date_1 DATE, heure TIME, note_1 SHORT, Candidature_Id LONG CONSTRAINT REntretien_Candidature_Id REFERENCES Candidature (Candidature_Id), RelationState_Candidature_Id SHORT, Jury_Oral_Id LONG CONSTRAINT REntretien_Jury_Oral_Id REFERENCES Jury_Oral (Jury_Oral_Id), RelationState_Jury_Oral_Id SHORT, CONSTRAINT MCandidature_IdJury_Oral_Id UNIQUE (Candidature_Id, Jury_Oral_Id), CONSTRAINT PrimaryKeys PRIMARY KEY (Entretien_Id) )
CREATE TABLE Coefficients (Coefficients_Id LONG, State_ SHORT, coef_Math SHORT, coef_Physique SHORT, coef_Fran_ais SHORT, coef_Langue SHORT, RelationState_ SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Coefficients_Id) )
CREATE TABLE Personne (Personne_Id LONG, State_ SHORT, nom TEXT, pr_nom TEXT, sexe TEXT, date_de_naissance DATE, nationalit_ TEXT, t_l_phone_1 TEXT, t_l_phone_2 TEXT, fax TEXT, e_mail TEXT, commune_de_naissance TEXT, d_partement_ou_pays_de_naissance TEXT, obligations_militaires TEXT, sursitaire DATE, Adresse_Id LONG CONSTRAINT RPersonne_Adresse_Id REFERENCES Adresse (Adresse_Id), RelationState_Adresse_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Personne_Id) )
CREATE TABLE Jur_ (Jur__Id LONG, State_ SHORT, Ecole_Id LONG CONSTRAINT RJur__Ecole_Id REFERENCES Ecole (Ecole_Id), RelationState_Ecole_Id SHORT, RelationState_ SHORT, RelationState_1 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Jur__Id) )
CREATE TABLE Industriel (Industriel_Id LONG, State_ SHORT, titre TEXT, entreprise TEXT, CONSTRAINT PrimaryKeys PRIMARY KEY (Industriel_Id) )
CREATE TABLE Centre_d__crit (Centre_d__crit_Id LONG, State_ SHORT, nom TEXT, Adresse_Id LONG CONSTRAINT RCentre_d__crit_Adresse_Id REFERENCES Adresse (Adresse_Id), RelationState_Adresse_Id SHORT, RelationState_ SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Centre_d__crit_Id) )
CREATE TABLE Disponibilit_ (Disponibilit__Id LONG, State_ SHORT, date_1 DATE, p_riode TEXT, RelationState_ SHORT, RelationState_1 SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Disponibilit__Id) )
CREATE TABLE Candidature_Voie_A (Candidature_Voie_A_Id LONG, State_ SHORT, note_Maths SHORT, note_Physique SHORT, note_Fran_ais SHORT, note_Langue SHORT, Centre_d__crit_Id LONG CONSTRAINT RCandidature_Voie_A_Centre_d__crit_Id REFERENCES Centre_d__crit (Centre_d__crit_Id), RelationState_Centre_d__crit_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Candidature_Voie_A_Id) )
CREATE TABLE Enseignant (Enseignant_Id LONG, State_ SHORT, Atablissement TEXT, CONSTRAINT PrimaryKeys PRIMARY KEY (Enseignant_Id) )
CREATE TABLE Candidature_Etat_ (Candidature_Etat__Id LONG, State_ SHORT, Candidature_Id LONG CONSTRAINT RCandidature_Etat__Candidature_Id REFERENCES Candidature (Candidature_Id), RelationState_Candidature_Id SHORT, Etat_Id LONG CONSTRAINT RCandidature_Etat__Etat_Id REFERENCES Etat (Etat_Id), RelationState_Etat_Id SHORT, e TEXT(255), CONSTRAINT MCandidature_Ide UNIQUE (Candidature_Id, e), CONSTRAINT MCandidature_IdEtat_Ide UNIQUE (Etat_Id, Candidature_Id, e), CONSTRAINT PrimaryKeys PRIMARY KEY (Candidature_Etat__Id) )
CREATE TABLE Jury_Oral_Jur__ (Jury_Oral_Id LONG CONSTRAINT RJury_Oral_Jur___Jury_Oral_Id REFERENCES Jury_Oral (Jury_Oral_Id), RelationState_Jury_Oral_Id SHORT, Jur__Id LONG CONSTRAINT RJury_Oral_Jur___Jur__Id REFERENCES Jur_ (Jur__Id), RelationState_Jur__Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Jury_Oral_Id, Jur__Id) )
CREATE TABLE Coefficients_Concours_ (Coefficients_Concours__Id LONG, State_ SHORT, Coefficients_Id LONG CONSTRAINT RCoefficients_Concours__Coefficients_Id REFERENCES Coefficients (Coefficients_Id), RelationState_Coefficients_Id SHORT, Concours_Id LONG CONSTRAINT RCoefficients_Concours__Concours_Id REFERENCES Concours (Concours_Id), RelationState_Concours_Id SHORT, t TEXT(255), CONSTRAINT MConcours_Idt UNIQUE (Concours_Id, t), CONSTRAINT MCoefficients_IdConcours_Idt UNIQUE (Concours_Id, t, Coefficients_Id), CONSTRAINT PrimaryKeys PRIMARY KEY (Coefficients_Concours__Id) )
CREATE TABLE Disponibilit__Jur__ (Disponibilit__Id LONG CONSTRAINT RDisponibilit__Jur___Disponibilit__Id REFERENCES Disponibilit_ (Disponibilit__Id), RelationState_Disponibilit__Id SHORT, Jur__Id LONG CONSTRAINT RDisponibilit__Jur___Jur__Id REFERENCES Jur_ (Jur__Id), RelationState_Jur__Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Disponibilit__Id, Jur__Id) )
CREATE TABLE Disponibilit__Salle_ (Disponibilit__Id LONG CONSTRAINT RDisponibilit__Salle__Disponibilit__Id REFERENCES Disponibilit_ (Disponibilit__Id), RelationState_Disponibilit__Id SHORT, Salle_Id LONG CONSTRAINT RDisponibilit__Salle__Salle_Id REFERENCES Salle (Salle_Id), RelationState_Salle_Id SHORT, CONSTRAINT PrimaryKeys PRIMARY KEY (Disponibilit__Id, Salle_Id) )
